BaseRefreshableTab.refresh   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 4
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
import React from 'react';
2
3
// TODO showLoading도 여기서 관리하도록 변경
4
export default class BaseRefreshableTab extends React.Component {
5
  // TODO util로 분류하기
6
  setSubState(key, state) {
7
    const newState = Object.assign({}, this.state[key], state);
8
    this.setState({ [key]: newState });
9
  }
10
11
  refresh() {
12
    // TODO refresh 코드도 공통화
13
    throw new Error('Should implement this method "refresh()"');
14
  }
15
}
16